//package com.zhu.tool_test.datastructure.queue.rabbitMq.sender;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.connection.CorrelationData;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.text.SimpleDateFormat;
//import java.util.Date;
//import java.util.UUID;
//
///**
// * @program: tool_test
// * @description:
// * @author: ggBall
// * @create: 2021-03-16 16:36
// **/
//@Component
//@Slf4j
//public class DirectSender {
//
//    @Autowired
//    RabbitTemplate rabbitTemplate;
//
//    public void directSend(int i) {
//        String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
//        String content = i+":hello!"+date;
//        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
//        log.info("class:{},message:{}","DirectSender",content);
//
//        rabbitTemplate.convertAndSend("amq.direct","direct_routingKey",content,correlationData);
//    }
//
//}
